<?php
/**
 * 菜单
 */
include_once './common_mbs.inc.php';
include_once './smarty.inc.php';
$admin_index_module_func = new osgh_admin_index_module_cls();
global $_ADMIN_ID;

$moduleList1 = $admin_index_module_func->getAdminIndexModuel($_ADMIN_ID, 1);
$module_id = $moduleList1[0]['module_id'];

$moduleList2 = array();

if (!empty($moduleList1))
{
	$moduleList2 = $admin_index_module_func->getAdminIndexModuel($_ADMIN_ID, 2, $module_id);
	foreach($moduleList2 as $key=>$moduleInfo2)
	{  
		foreach($moduleList1 as $module)
		{ 
			if($moduleInfo2['parent_id'] == $module['module_id'])
			{
			    $moduleInfo2['parent_code'] = $module['module_code'];
			}
		}
	   	 $moduleList2[$key] = $moduleInfo2;
	}
}

$smarty->assign('moduleList2', $moduleList2);
$smarty->assign('moduleList1', $moduleList1); 
$smarty->assign('mid', $module_id);
$smarty->display('index_menu.tpl');
?>